<div class="sidebar">
	<ul>
		<?php 
			echo "<li>".$this->Html->link('Applications',array('controller'=>'applications','action'=>'index'))."</li>";
				
			echo "<li>".$this->Html->link('--'.$sonapp['Application']['name'],array('controller'=>'versions','action'=>'VersionsOfApplication',$sonapp['Application']['id']))."</li>";

			echo "<li>".$this->Html->link('----'.$saversion['Version']['name'],array('controller'=>'tables','action'=>'TablesOfVersion',$saversion['Version']['id']))."</li>";
		?>
	</ul>
</div>

<div class="tables view">
<h2><?php  echo __('Table');?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($table['Table']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Name'); ?></dt>
		<dd>
			<?php echo h($table['Table']['name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Description'); ?></dt>
		<dd>
			<?php echo h($table['Table']['description']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Version'); ?></dt>
		<dd>
			<?php echo $this->Html->link($table['Version']['name'], array('controller' => 'versions', 'action' => 'view', $table['Version']['id'])); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Table'), array('action' => 'edit', $table['Table']['id'])); ?> </li>
		<li>-------------------------</li>
		<li><?php echo $this->Form->postLink(__('Delete Table'), array('action' => 'delete', $table['Table']['id']), null, __('Are you sure you want to delete # %s?', $table['Table']['id'])); ?> </li>
		<!--li><?php echo $this->Html->link(__('List Tables'), array('action' => 'index')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('New Table'), array('action' => 'add')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('List Versions'), array('controller' => 'versions', 'action' => 'index')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('New Version'), array('controller' => 'versions', 'action' => 'add')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('List Colonnes'), array('controller' => 'colonnes', 'action' => 'index')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('New Colonne'), array('controller' => 'colonnes', 'action' => 'add')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('List Lignes'), array('controller' => 'lignes', 'action' => 'index')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('New Ligne'), array('controller' => 'lignes', 'action' => 'add')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('List Ruptures'), array('controller' => 'ruptures', 'action' => 'index')); ?> </li-->
		<!--li><?php echo $this->Html->link(__('New Rupture'), array('controller' => 'ruptures', 'action' => 'add')); ?> </li-->
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Colonnes');?></h3>
	<?php if (!empty($table['Colonne'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Name'); ?></th>
		<th><?php echo __('Type'); ?></th>
		<th><?php echo __('TopPk'); ?></th>
		<th><?php echo __('Description'); ?></th>
		<th><?php echo __('Table Id'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($table['Colonne'] as $colonne): ?>
		<tr>
			<td><?php echo $colonne['id'];?></td>
			<td><?php echo $colonne['name'];?></td>
			<td><?php echo h($colonne['pgtypecol_name']); ?>&nbsp; <?php if ($colonne['longueur']) {	echo "(".h($colonne['longueur']).")"; } ?></td>
			<td><?php echo $colonne['topPk'];?></td>
			<td><?php echo $colonne['description'];?></td>
			<td><?php echo $colonne['table_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'colonnes', 'action' => 'view', $colonne['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'colonnes', 'action' => 'edit', $colonne['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'colonnes', 'action' => 'delete', $colonne['id']), null, __('Are you sure you want to delete # %s?', $colonne['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Colonne'), array('controller' => 'colonnes', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Lignes');?></h3>
	<?php if (!empty($table['Ligne'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Title'); ?></th>
		<th><?php echo __('Motifchangement'); ?></th>
		<th><?php echo __('Topsup'); ?></th>
		<th><?php echo __('Table Id'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($table['Ligne'] as $ligne): ?>
		<tr>
			<td><?php echo $ligne['id'];?></td>
			<td><?php echo $ligne['title'];?></td>
			<td><?php echo $ligne['motifchangement'];?></td>
			<td><?php echo $ligne['topsup'];?></td>
			<td><?php echo $ligne['table_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'lignes', 'action' => 'view', $ligne['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'lignes', 'action' => 'edit', $ligne['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'lignes', 'action' => 'delete', $ligne['id']), null, __('Are you sure you want to delete # %s?', $ligne['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Ligne'), array('controller' => 'lignes', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Ruptures');?></h3>
	<?php if (!empty($table['Rupture'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Name'); ?></th>
		<th><?php echo __('Description'); ?></th>
		<th><?php echo __('Table Id'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($table['Rupture'] as $rupture): ?>
		<tr>
			<td><?php echo $rupture['id'];?></td>
			<td><?php echo $rupture['name'];?></td>
			<td><?php echo $rupture['description'];?></td>
			<td><?php echo $rupture['table_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'ruptures', 'action' => 'view', $rupture['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'ruptures', 'action' => 'edit', $rupture['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'ruptures', 'action' => 'delete', $rupture['id']), null, __('Are you sure you want to delete # %s?', $rupture['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Rupture'), array('controller' => 'ruptures', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
